package com.test;

import com.dbc.StudentsDB;
import com.vo.Students;
import org.junit.Test;
import java.util.List;

public class test {
    @Test
    public void testListAll(){
        StudentsDB sdb = new StudentsDB();
        List<Students> students = sdb.getAllStudents();
        for (Students stu:students) {
            System.out.println(stu);
        }
    }
    @Test
    public void testInert(){
        String studentId="2009110116";
        String studentName="谢亚飞";
        String studentPwd="123456";
        String sex="男";
        int classId=10201641;

        Students stu=new Students(studentId,studentName,studentPwd,sex,classId);
        StudentsDB sdb = new StudentsDB();
        System.out.println(sdb.updateStudents(stu));
    }
}
